<template>
  <div>
    <el-form
      ref="formDataEntrustInspectionInfo"
      class="base-pipeline-layout"
      :model="formDataEntrustInspectionInfo"
      :rules="formDataSampleDeliveryInfoRules"
      status-icon
      label-width="110px"
    >
      <el-form-item
        label="检验类别"
        :error="errorMsgEntrustInspectionInfo.parentId"
      >
        <el-input
          v-model="formDataEntrustInspectionInfo.parentId"
          :disabled="readOnly"
          autocomplete="off"
        ></el-input>
      </el-form-item>
      <el-form-item
        style="width: 100%"
        label="执行标准"
        :error="errorMsgEntrustInspectionInfo.serviceName"
      >
        <el-input
          v-model="formDataEntrustInspectionInfo.serviceName"
          :disabled="readOnly"
          autocomplete="off"
        ></el-input>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
export default {
  name: "FormDataEntrustInspectionInfo",
  props: {
    readOnly: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {
      formDataEntrustInspectionInfo: {
        id: 0,
        parentId: "",
        serviceName: "",
      },
      formDataSampleDeliveryInfoRules: {
        parentId: [
          {
            required: true,
            trigger: "blur",
            validator: this.Helper.validateFunction,
          },
        ],
        serviceName: [
          {
            required: true,
            trigger: "blur",
            validator: this.Helper.validateFunction,
          },
        ],
      },
      errorMsgEntrustInspectionInfo: {
        parentId: "",
        serviceName: "",
      },
    };
  },
  watch: {},
  created() {},
  methods: {},
};
</script>
